package com.easyaop.api.advisor;

import com.easyaop.api.pointcut.Pointcut;

import java.util.LinkedHashSet;
import java.util.Set;

public abstract class Advisor {
    /**
     * 方法签名 格式 包名.类名.方法名desc
     * com.MyBean.add(II)I
     * 不支持通配符
     */
    protected Set<String> signatures = new LinkedHashSet<>();

    protected final Pointcut pointcut;

    public Advisor(Pointcut pointcut) {
        this.pointcut = pointcut;
    }

    public Pointcut getPointcut() {
        return pointcut;
    }

    public Set<String> getSignatures() {
        return signatures;
    }

    public abstract void addSignature(String signature);
}
